#include "DLinklist.h"

void test0()
{
	DLTNode* plist = DLTInit();

	DLTPushFront(plist, 1);
	DLTPushFront(plist, 2);
	DLTPushFront(plist, 3);
	DLTPushFront(plist, 4);
	DLTPrint(plist);


	DLTPushBack(plist, 5);
	DLTPushBack(plist, 6);
	DLTPushBack(plist, 7);
	DLTPushBack(plist, 8);
	DLTPrint(plist);

	DLTPopFront(plist);
	DLTPopFront(plist);
	DLTPopBack(plist);
	DLTPopBack(plist);
	DLTPrint(plist);

	DLTNode* pos = FindDLT(plist, 5);
	if (pos)
	{
		DLTErase(pos);
		pos = NULL;
	}
	DLTPrint(plist);

	DLTDestroy(plist);
	plist = NULL;
}


int main()
{
	test0();
}

